#pragma once
#include<iostream>
#include <iostream>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <string.h>
#include<cstring>
#include"Mutex.hpp"
#include<cstdlib>
#include<unistd.h> 
enum  ExitCode // 退出码
{
    OK=0,
    USAGE_ERR,
    SOCKET_ERROR,
    BIND_ERROR,
    LISTEN_ERROR,
    CONNECT_ERROR,
    FORK_ERROR
};

class NoCopy
{
public:
    NoCopy(){}
    ~NoCopy(){}
    NoCopy(const NoCopy&)=delete;//将拷贝构造删除
    const NoCopy &operator=(const NoCopy&)=delete;//将拷贝赋值删除
private:
};

#define CONV(addr) ((struct sockaddr*)&addr)//将sockaddr_in结构体转换为sockaddr结构体